package com.phkj.qdh.ui.adapter

import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.phkj.qdh.R
import com.phkj.qdh.ui.fragment.instructionsheet.Danshiren

class DangshirenAdapter:BaseQuickAdapter<Danshiren,QuickViewHolder>() {
    override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: Danshiren?) {
        holder.setText(R.id.tv_name,"当事人：${item?.partyName}")
        holder.setText(R.id.tv_phone,"当事人电话：${item?.partyPhone}")
        holder.setText(R.id.tv_number,"当事人身份证：${item?.receiveId}")
        holder.setText(R.id.commt,"当事人备注：${item?.comment?:""}")
    }

    override fun onCreateViewHolder(
        context: Context,
        parent: ViewGroup,
        viewType: Int
    ): QuickViewHolder {
        return QuickViewHolder(R.layout.dangshiren,parent)
    }
}